﻿<UserControl x:Class="HDInsightStudio.HiveStudioView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid>
        <ContentControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib" IsTabStop="False">
            <ContentControl.Resources>
                <ResourceDictionary>
                    <ResourceDictionary.MergedDictionaries>
                        <ResourceDictionary Source="/ViewMaker.Core;component/wpf/wpfgenericresource.xaml" />
                        <ResourceDictionary Source="/ViewMaker.Core;component/wpf/wpferrorstyleresource.xaml" />
                    </ResourceDictionary.MergedDictionaries>
                </ResourceDictionary>
            </ContentControl.Resources>
            <Grid Name="HiveStudio" DataContext="{Binding Mode=OneWay}">
                <Menu FocusManager.IsFocusScope="False" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0">
                    <MenuItem Header="File">
                        <MenuItem Header="Open" Command="{Binding Path=LoadCommand}" />
                        <MenuItem Header="Save" Command="{Binding Path=SaveCommand}" />
                        <Separator />
                        <MenuItem Header="Close" Command="{Binding Path=CloseCommand}" />
                    </MenuItem>
                </Menu>
                <Grid Name="HiveStudioDataPanel" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0">
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="auto" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Label Width="50" HorizontalContentAlignment="Right" VerticalAlignment="Center">Job Id:</Label>
                            <Label Name="JobId" VerticalAlignment="Center" Grid.Column="1">
                                <TextBlock Text="{Binding Path=JobId,Mode=OneWay}" />
                            </Label>
                        </Grid>
                    </StackPanel>
                    <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0">
                        <TabControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0">
                            <TabControl.Items>
                                <TabItem Header="Command">
                                    <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                                        <TextBox Name="InputCommand" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Text="{Binding Path=InputCommand, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True }" VerticalAlignment="Stretch" Grid.Row="0" Grid.Column="0" />
                                        <StackPanel Name="HiveStudioButtonPanel" Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0">
                                            <Button Name="ExecuteMapReduceCommand" Command="{Binding Path=ExecuteMapReduceCommand,Mode=OneWay}" Margin="5" Content="{StaticResource PlayImage}" />
                                        </StackPanel>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="*" />
                                            <RowDefinition Height="auto" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                    </Grid>
                                </TabItem>
                                <TabItem Header="Settings">
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="auto" />
                                                <ColumnDefinition Width="*" />
                                            </Grid.ColumnDefinitions>
                                            <Label Width="100" VerticalAlignment="Center">Status</Label>
                                            <TextBox Name="Status" Text="{Binding Path=Status, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True }" VerticalAlignment="Center" Grid.Column="1" />
                                        </Grid>
                                    </StackPanel>
                                </TabItem>
                            </TabControl.Items>
                        </TabControl>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                    </Grid>
                    <TextBox Name="Output" IsReadOnly="True" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Text="{Binding Path=Output, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True }" Background="WhiteSmoke" VerticalAlignment="Stretch" Grid.Row="2" Grid.Column="0" />
                    <Label Name="JobStatusCode" VerticalAlignment="Center" Grid.Row="3" Grid.Column="0">
                        <TextBlock Text="{Binding Path=JobStatusCode,Mode=OneWay}" />
                    </Label>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                </Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
            </Grid>
        </ContentControl>
    </Grid>
</UserControl>
